// pages/hlCenter/index.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        tabName: ['会所', '蜜月到家'],
        curTab: '会所',
        searchValue: '',
        data1: [{
                name: '顺产',
                count: 15
            },
            {
                name: '剖腹产',
                count: 15
            },
            {
                name: '正常',
                count: 15
            },
            {
                name: '亚健康',
                count: 15
            }
        ],
        data2: [{
            type: '一楼',
            floors: [{
                    num: 101,
                    name: 'simon',
                    status: '1'
                }, {
                    num: 102,
                    name: 'simon',
                    status: '1'
                },
                {
                    num: 103,
                    name: 'simon',
                    status: '1'
                },
                {
                    num: 104,
                    name: 'simon',
                    status: '1'
                },
                {
                    num: 105,
                    name: 'simon',
                    status: '1'
                }
            ]
        }, {
            type: '二楼',
            floors: [{
                    num: 201,
                    name: 'simon',
                    status: '1'
                }, {
                    num: 202,
                    name: 'simon',
                    status: '1'
                },
                {
                    num: 203,
                    name: 'simon',
                    status: '1'
                },
                {
                    num: 204,
                    name: 'simon',
                    status: '0'
                },
                {
                    num: 205,
                    name: 'simon',
                    status: '1'
                }
            ]
        }],
        data3: [{
            id: 1,
            name: '李丽',
            count: 0,
            total: 2
        }, {
            id: 2,
            name: '征欢欢',
            count: 0,
            total: 2
        }, {
            id: 3,
            name: '俊就是',
            count: 2,
            total: 2
        }, {
            id: 4,
            name: '里斯',
            count: 0,
            total: 2
        }, {
            id: 5,
            name: '张三',
            count: 0,
            total: 2
        }]
    },

    onhsInfo(e) {
        const {
            name
        } = e.currentTarget.dataset
        wx.navigateTo({
            url: `/pages/hsInfo/index?name=${name}`,
        })
    },

    onhlzxInfo(e) {
        const {
            name
        } = e.currentTarget.dataset
        wx.navigateTo({
            url: `/pages/hlzxInfo/index?name=${name}`,
        })
    },

    onServeName(e) {
        const {
            name
        } = e.currentTarget.dataset
        wx.navigateTo({
            url: `/pages/hlzxInfo/index?name=${name}`,
        })
    },
    onSearch(e) {
        console.log(e.detail)
    },
    onCancel() {
        this.setData({
            searchValue: ''
        })
    },

    onTab(e) {
        const {
            name
        } = e.currentTarget.dataset
        this.setData({
            curTab: name
        })
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})